<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>个人信息</title>
	 <meta name="decorator" content="ERP-UI"/>
	<!-- <meta name="decorator" content="default"/> -->
	<script type="text/javascript">
		$(document).ready(function() {
			$("#inputForm").validate({
				submitHandler: function(form){
					loading('正在提交，请稍等...');
					form.submit();
				},
				errorContainer: "#messageBox",
				errorPlacement: function(error, element) {
					$("#messageBox").text("输入有误，请先更正。");
					if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
						error.appendTo(element.parent().parent());
					} else {
						error.insertAfter(element);
					}
				}
			});
		});
	</script>
</head>
<body>
	<%-- <ul class="nav nav-tabs">
		<li class="active"><a href="${ctx}/sys/user/info">个人信息</a></li>
		<li><a href="${ctx}/sys/user/modifyPwd">修改密码</a></li>
	</ul><br/> --%>
	<form id="inputForm" modelAttribute="user" action="${ctx}/sys/user/info" method="post" class="form-horizontal"> 
	
		<%-- <sys:message content="${message}"/> --%>
			<div class="line_grid">
							<div class="g_3"><span class="label">头像:</span></div>
							<div class="g_9">
								<input type="hidden" id="nameImage" name="photo" htmlEscape="false" maxlength="255" class="input-xlarge"/>
								<sys:ckfinder input="nameImage" type="images" uploadPath="/photo" selectMultiple="false" maxWidth="100" maxHeight="100"/>
							</div>
			</div>
			
		 <div class="line_grid">
							<div class="g_3"><span class="label">归属公司:</span></div>
							<div class="g_9">
							<input class="simple_field" disabled="disabled"  type="text" value="${user.company.name}" />
						 
							</div>
			</div>
			 <div class="line_grid">
							<div class="g_3"><span class="label">归属部门:</span></div>
							<div class="g_9">
							<input class="simple_field" disabled="disabled"  type="text" value="${user.office.name}" />
						 
							</div>
			</div>
			<div class="line_grid">
							<div class="g_3"><span class="label">姓名:</span></div>
							<div class="g_9">
							<input value="${user.name}" htmlEscape="false" maxlength="50" class="required simple_field" disabled="disabled"/>
						 
							</div>
			</div>
	 			<div class="line_grid">
							<div class="g_3"><span class="label">邮箱:</span></div>
							<div class="g_9">
							<input name="email" value="${user.email}" htmlEscape="false" maxlength="50" class="email simple_field" />
						 
							</div>
			</div>
			
		    <div class="line_grid">
							<div class="g_3"><span class="label">电话:</span></div>
							<div class="g_9">
							<input name="phone" value="${user.phone}"  htmlEscape="false" maxlength="50" class="email simple_field" />
						 
							</div>
			</div>
			
			<div class="line_grid">
							<div class="g_3"><span class="label">手机:</span></div>
							<div class="g_9">
							<input name="mobile" value="${user.mobile}"  htmlEscape="false" maxlength="50" class="email simple_field"/>
						 
							</div>
			</div>
		 		<div class="line_grid">
							<div class="g_3"><span class="label">备注:</span></div>
							<div class="g_9">
								<textarea class="simple_field"  name="remarks">${user.remarks }</textarea>
							</div>
						</div>
	 
	 	<div class="line_grid">
							<div class="g_3"><span class="label">用户类型:</span></div>
							<div class="g_9">
								<input class="simple_field" disabled="disabled"  type="text" value="${fns:getDictLabel(user.userType, 'sys_user_type', '无')}" />
							</div>
						</div>
						
							<div class="line_grid">
							<div class="g_3"><span class="label">用户角色:</span></div>
							<div class="g_9">
								<input class="simple_field" disabled="disabled"  type="text" value="${user.roleNames}" />
							</div>
						</div>
		 
		 							<div class="line_grid">
							<div class="g_3"><span class="label">上次登录:</span></div>
							<div class="g_9">
							IP: ${user.oldLoginIp}&nbsp;&nbsp;&nbsp;&nbsp;时间：<fmt:formatDate value="${user.oldLoginDate}" type="both" dateStyle="full"/>
							<%-- 	<input class="simple_field" disabled="disabled"  type="text" value="IP: ${user.oldLoginIp}&nbsp;&nbsp;&nbsp;&nbsp;时间：<fmt:formatDate value="${user.oldLoginDate}" /> --%>
							</div>
						</div>
		 
						 <div class="line_grid">
													<div class="g_3"><span class="label">Submit</span></div>
													<div class="g_9">
														<input  id="btnSubmit"  type="submit" value="保 存" class="submitIt simple_buttons" />
													</div>
						 </div>
	</form>
</body>
</html>